public class Main {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 2025; i++) {
            int num = (int)Math.pow(i, 3);
            if (num % 10 == 3) {
                count++;
            }
        }
        System.out.println(count);
    }

    public static void main1(String[] args) {
        for (long i = 20250412; ; i++) {
//            System.out.println(i);
            if ((i + 20250412) % 20240413 == 0 && (i + 20240413) % 20250412 == 0) {
                System.out.println(i);
                break;
            }
        }
    }

}
